package org.six.ways.spring.test;

import org.six.ways.spring.user.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.concurrent.CountDownLatch;

/**
 * @author Mr.Fu
 * @date 2023/2/11 下午3:15
 */
public class AnnotationContext {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(UserService.class);
        UserService userService = applicationContext.getBean("userService", UserService.class);
        String name = userService.getName();
        System.out.println(name);

    }
}
